//
//  CertificationResultsViewController.m
//  chongwu
//
//  Created by 隼目 on 2021/9/23.
//

#import "CertificationResultsViewController.h"

@interface CertificationResultsViewController ()

@end

@implementation CertificationResultsViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    [self creatView];
}
-(void)viewWillAppear:(BOOL)animated{
    self.navigationController.navigationBarHidden=YES;
}
-(void)viewWillDisappear:(BOOL)animated{
    self.navigationController.navigationBarHidden=NO;
}

-(void)creatView{
  

    UIView *topView=[UIView new];
    [self.view addSubview:topView];
    [topView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.top.mas_equalTo(0);
        make.height.mas_equalTo(NAV_HEIGHT);
    }];
    
    UIImageView *topImage=[UIImageView new];
    [topView addSubview:topImage];
    [topImage mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.top.bottom.mas_equalTo(0);
    }];
    topImage.image=[UIImage imageNamed:@"wudongwu"];
    
    UIView *titleView=[UIView new];
    [topView addSubview:titleView];
    [titleView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.mas_equalTo(0);
        make.top.mas_equalTo(Height_StatusBar);
        make.height.mas_equalTo(44);
    }];
    
    UILabel *titleLable=[UILabel new];
    [titleView addSubview:titleLable];
    [titleLable mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(50);
        make.right.mas_equalTo(-50);
        make.top.bottom.mas_equalTo(0);
    }];
    titleLable.text=@"认证结果";
    titleLable.textColor=rgba(47,47,47,1);
    titleLable.font=[UIFont fontWithName:@"Helvetica-Bold" size:autoScaleW(38)];
    titleLable.textAlignment=NSTextAlignmentCenter;
    
    self.rightBarButton=[UIButton new];
    [titleView addSubview:self.rightBarButton];
    [self.rightBarButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.mas_equalTo(0);
        make.width.mas_equalTo(70*_mainWidth);
        make.height.mas_equalTo(45*_mainHeight);
        make.right.mas_equalTo(-35*_mainWidth);
    }];
    [self.rightBarButton setTitle:@"完成" forState:0];
    [self.rightBarButton setTitleColor:rgba(250,100,0,1) forState:0];
    self.rightBarButton.titleLabel.font=[UIFont fontWithName:@"PingFang SC" size:autoScaleW(30)];
    
    UIImageView *iamgeView=[UIImageView new];
    [self.view addSubview:iamgeView];
    [iamgeView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.width.height.mas_equalTo(178*_mainWidth);
        make.top.mas_equalTo(topView.mas_bottom).mas_equalTo(121*_mainHeight);
        make.centerX.mas_equalTo(0);
    }];
    iamgeView.image=[UIImage imageNamed:@"tijiaochenggong"];
    
    UILabel *label=[UILabel new];
    [self.view addSubview:label];
    [label mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.mas_equalTo(0);
        make.top.mas_equalTo(iamgeView.mas_bottom).mas_equalTo(21*_mainHeight);
    }];
    label.text=@"提交成功";
    label.textColor=rgba(47,47,47,1);
    label.font=[UIFont fontWithName:@"PingFang SC" size:autoScaleW(32)];
    
    UILabel *label2=[UILabel new];
    [self.view addSubview:label2];
    [label2 mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.mas_equalTo(0);
        make.top.mas_equalTo(label.mas_bottom).mas_equalTo(43*_mainHeight);
        make.width.mas_equalTo(545*_mainWidth);
    }];
    label2.numberOfLines=0;
    label2.textAlignment=NSTextAlignmentCenter;
    label2.text=@"工作人员将在1～2个工作日内与您取得联系，请注意保持电话畅通～";
    label2.textColor=rgba(191,191,191,1);
    label2.font=[UIFont fontWithName:@"PingFang SC" size:autoScaleW(26)];
    [label2 layoutIfNeeded];
    
    
    UIButton *signInBtn=[UIButton new];
    [self.view addSubview:signInBtn];
    [signInBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(39*_mainWidth);
        make.width.mas_equalTo(_mainW-78*_mainWidth);
        make.top.mas_equalTo(label2.mas_bottom).mas_equalTo(60*_mainHeight);
        make.height.mas_equalTo(_mainHeight*87);
    }];
    [signInBtn setTitle:@"返回" forState:0];
    [signInBtn setTitleColor:[UIColor whiteColor] forState:0];
    signInBtn.titleLabel.font=[UIFont fontWithName:@"PingFang SC" size:autoScaleW(36)];
    [signInBtn layoutIfNeeded];
    signInBtn.layer.masksToBounds=YES;
    signInBtn.layer.cornerRadius=87*_mainHeight/2;
    CAGradientLayer *gradientLayer = [CAGradientLayer layer];
    gradientLayer.frame = signInBtn.bounds;
    //将CAGradientlayer对象添加在我们要设置背景色的视图的layer层
    [signInBtn.layer insertSublayer:gradientLayer atIndex:0];
    //设置渐变区域的起始和终止位置（范围为0-1）
    gradientLayer.startPoint = CGPointMake(0, 1);
    gradientLayer.endPoint = CGPointMake(1, 1);
    gradientLayer.colors = @[(__bridge id)rgba(255,159,0,1).CGColor,
                             (__bridge id)rgba(255,116,0,1).CGColor ,
                             (__bridge id)rgba(255,102,0,1).CGColor];
    //设置颜色分割点（范围：0-1）
    gradientLayer.locations = @[@(0),@(0.5), @(1.0f)];
    signInBtn.layer.shadowColor = rgba(196,50,0,0.36).CGColor;
    signInBtn.layer.shadowOffset = CGSizeMake(0,0);
    signInBtn.layer.shadowOpacity = 1;
    signInBtn.layer.shadowRadius = 4;
    [signInBtn addTarget:self action:@selector(popVc) forControlEvents:UIControlEventTouchUpInside];
}
/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
